Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search category autocomplete includes group category #2731

Conversation

Wizmaster
Copy link
Contributor

@Wizmaster Wizmaster commented May 8, 2024

Resolve #2324

Reading the discussion on #1681 and #1767, I understand that people either want the category autocomplete to consider group names when searching or not. (I happen to be in the group wishing for it to match group names 😄)

I added a new option switch to have the category autocomplete match on category group names.

It can be tested on the test budget, the option is in the application settings and using the "Bills" category group name in the category autocomplete demonstrates it.

@github-actions github-actions bot changed the title Search by Category Including Subcategory [WIP] Search by Category Including Subcategory May 8, 2024
Copy link

netlify bot commented May 8, 2024

Deploy Preview for actualbudget ready!

Name Link
🔨 Latest commit 6c08db7
🔍 Latest deploy log https://app.netlify.com/sites/actualbudget/deploys/663cf49ef460b5000830dcc3
😎 Deploy Preview https://deploy-preview-2731.demo.actualbudget.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

github-actions bot commented May 8, 2024

Bundle Stats — desktop-client

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
9 4.71 MB → 4.71 MB (+1.38 kB) +0.03%
Changeset
File Δ Size
src/components/settings/Autocomplete.tsx 🆕 +1.1 kB 0 B → 1.1 kB
src/components/autocomplete/CategoryAutocomplete.tsx 📈 +205 B (+2.17%) 9.21 kB → 9.42 kB
src/components/settings/index.tsx 📈 +77 B (+1.27%) 5.94 kB → 6.01 kB
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

Asset File Size % Changed
static/js/index.js 3 MB → 3 MB (+1.38 kB) +0.04%

Smaller

No assets were smaller

Unchanged

Asset File Size % Changed
static/js/indexeddb-main-thread-worker-e59fee74.js 13.5 kB 0%
static/js/resize-observer.js 18.37 kB 0%
static/js/BackgroundImage.js 122.29 kB 0%
static/js/narrow.js 59.81 kB 0%
static/js/usePreviewTransactions.js 790 B 0%
static/js/AppliedFilters.js 20.53 kB 0%
static/js/wide.js 262.4 kB 0%
static/js/ReportRouter.js 1.23 MB 0%

Copy link
Contributor

github-actions bot commented May 8, 2024

Bundle Stats — loot-core

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
1 1.2 MB 0%

Changeset

No files were changed

View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

No assets were bigger

Smaller

No assets were smaller

Unchanged

Asset File Size % Changed
kcab.worker.js 1.2 MB 0%

@Wizmaster Wizmaster force-pushed the feature/category-group-autocomplete branch from 0a56ddc to 088e06e Compare May 8, 2024 21:51
@youngcw
Copy link
Member

youngcw commented May 8, 2024

We generally try to avoid having extra settings like this. Thats partly why the discussion has so heated around this topic. Its either one way or another, or we have to add an extra setting. Undesirable no matter how we shake it.

A thought I had just now. Having settings be contextual is nicer than global settings. Could we put this setting inside the autocomplete somehow instead of the settings page?

@youngcw
Copy link
Member

youngcw commented May 8, 2024

Another thought. Could we have a way to tell the autocomplete to include groups incidentally? Like type "$bills" to search for the group bills? That is still getting to magic syntax which is its own kind of non-optimal

@Wizmaster
Copy link
Contributor Author

Wizmaster commented May 8, 2024

@youngcw I agree that having a setting like that is not optimal.

I'm not sure on how to add the setting in the dropdown in a nice and unobtrusive way. Adding it at the bottom of the dropdown would not be great: once set to the user preference, it will be rather useless and keep displaying all the time.

I can add a magic syntax instead, but its discoverability will be rather poor, and it will not feel really natural (especially on mobile)

I can also move the new setting in the "advanced settings", would it be better?

@Wizmaster Wizmaster force-pushed the feature/category-group-autocomplete branch from 088e06e to f3fa7a6 Compare May 8, 2024 22:29
@youngcw
Copy link
Member

youngcw commented May 8, 2024

thats a good point that mobile would probably be a pain with magic syntax

- Added a new option switch to have the category autocomplete match on category group names
@Wizmaster Wizmaster force-pushed the feature/category-group-autocomplete branch from f3fa7a6 to 6c08db7 Compare May 9, 2024 16:06
@Wizmaster
Copy link
Contributor Author

@youngcw I moved the new setting in the "advanced settings" sections. I feel it's the best that can be done to support the two ways of using the category autocomplete.

@Wizmaster Wizmaster changed the title [WIP] Search by Category Including Subcategory Search by Category Including Subcategory May 9, 2024
@Wizmaster Wizmaster changed the title Search by Category Including Subcategory Search category autocomplete includes group category May 10, 2024
@MatissJanis
Copy link
Member

MatissJanis commented May 10, 2024

We've been back-and-forth with this for a while now and the current consensus is that category groups should not be included in search results.

We also do not want to have a setting for each and every little UI quirk as it would unnecessarily clutter the product. Instead - we have opinionated workflows.

I can see two options how to proceed here:

  1. add this functionality in your fork - you'll have totally freedom and flexibility there; and then you can continuously sync the upstream changes in your fork to get the latest updates
  2. figure out another way how to enable this functionality (without creating a separate setting for it) - @youngcw proposal is interesting, but as pointed out before - would not work for mobile; so a good starting point here would be to write a proposal in the linked feature ticket and get a consensus there before jumping to implementation.

edit: personally - I don't care about including/excluding category groups here. What I do care about is the consistency in the product. We can't add a feature, then remove it, then add it, then again remove it.

@Wizmaster
Copy link
Contributor Author

@MatissJanis Ok, duly noted then.

A few points before leaving:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Search by Category Including Subcategory
3 participants